package com.ruoyi.zsyh.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.zsyh.mapper.ZsyhStorePartsselfMapper;
import com.ruoyi.zsyh.domain.ZsyhStorePartsself;
import com.ruoyi.zsyh.service.IZsyhStorePartsselfService;
import com.ruoyi.common.core.text.Convert;

/**
 * 配件店自有配件管理Service业务层处理
 * 
 * @author yuexl
 * @date 2022-02-28
 */
@Service
public class ZsyhStorePartsselfServiceImpl implements IZsyhStorePartsselfService 
{
    @Autowired
    private ZsyhStorePartsselfMapper zsyhStorePartsselfMapper;

    /**
     * 查询配件店自有配件管理
     * 
     * @param id 配件店自有配件管理ID
     * @return 配件店自有配件管理
     */
    @Override
    public ZsyhStorePartsself selectZsyhStorePartsselfById(String id)
    {
        return zsyhStorePartsselfMapper.selectZsyhStorePartsselfById(id);
    }

    /**
     * 查询配件店自有配件管理列表
     * 
     * @param zsyhStorePartsself 配件店自有配件管理
     * @return 配件店自有配件管理
     */
    @Override
    public List<ZsyhStorePartsself> selectZsyhStorePartsselfList(ZsyhStorePartsself zsyhStorePartsself)
    {
        return zsyhStorePartsselfMapper.selectZsyhStorePartsselfList(zsyhStorePartsself);
    }

    /**
     * 新增配件店自有配件管理
     * 
     * @param zsyhStorePartsself 配件店自有配件管理
     * @return 结果
     */
    @Override
    public int insertZsyhStorePartsself(ZsyhStorePartsself zsyhStorePartsself)
    {
        zsyhStorePartsself.setCreateTime(DateUtils.getNowDate());
        return zsyhStorePartsselfMapper.insertZsyhStorePartsself(zsyhStorePartsself);
    }

    /**
     * 修改配件店自有配件管理
     * 
     * @param zsyhStorePartsself 配件店自有配件管理
     * @return 结果
     */
    @Override
    public int updateZsyhStorePartsself(ZsyhStorePartsself zsyhStorePartsself)
    {
        zsyhStorePartsself.setUpdateTime(DateUtils.getNowDate());
        return zsyhStorePartsselfMapper.updateZsyhStorePartsself(zsyhStorePartsself);
    }

    /**
     * 删除配件店自有配件管理对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteZsyhStorePartsselfByIds(String ids)
    {
        return zsyhStorePartsselfMapper.deleteZsyhStorePartsselfByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除配件店自有配件管理信息
     * 
     * @param id 配件店自有配件管理ID
     * @return 结果
     */
    @Override
    public int deleteZsyhStorePartsselfById(String id)
    {
        return zsyhStorePartsselfMapper.deleteZsyhStorePartsselfById(id);
    }
}
